<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>中华盛世金像后台管理系统</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico">

    <link href="/admin/public/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/admin/public/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">

    <link href="/admin/public/css/plugins/jqgrid/ui.jqgridffe4.css?0820" rel="stylesheet">
    <link href="/admin/public/css/animate.min.css" rel="stylesheet">
    <link href="/admin/public/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/admin/public/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    
    <link href="/admin/public/css/plugins/datapicker/datepicker3.css" rel="stylesheet"><!--日期选择-->
    <style>
        #alertmod_table_list_2 {
            top: 900px !important;
        }
        .xianshi{display: block;}
        .yincang{display: none;}
        .file {
            width: 165px;
            height: 76px;
            line-height: 150px;
            display: block;
            position: absolute;
            left: 3px;
            top: 83px;
            z-index: 999;
            opacity: 0;
            filter: alpha(opacity=0);
        }
        #imgShow{ height:118px; float:left; margin-top: 5px;}
    </style>
</head>
<body class="gray-bg">

<div class="ibox-content">
    <div class="jqGrid_wrapper">
        <div class="row">
            <form action="/admin/cash/index" method="get">
                <div class="col-sm-3 col-sm-offset-1">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">筛选：</label>
                        <input type="hidden" id="user_number" value="1"/>
                        <div class="col-sm-9">
                            <label class="checkbox-inline i-checks">
                                <input type="checkbox"<?php if(isset($_GET['option1'])&&$_GET['option1']){echo " checked ";}?> name="option1" value="option1">未处理</label>
                            <label class="checkbox-inline i-checks">
                                <input type="checkbox" name="option2" <?php if(isset($_GET['option2'])&&$_GET['option2']){echo " checked ";}?> value="option2">已处理</label>
                        </div>
                    </div>
                </div>

                <div class="col-sm-3">
                    <div class="form-group" id="data_5">
                        <div class="input-daterange input-group" id="datepicker">
                            <input type="text" class="input-sm form-control" name="start" <?php if(isset($_GET['start'])&&$_GET['start']){echo " value='".$_GET['start']."' ";}else{echo " value=\"2016-01-01\" ";}?>/>
                            <span class="input-group-addon">到</span>
                            <input type="text" class="input-sm form-control" name="end" <?php if(isset($_GET['end'])&&$_GET['end']){echo " value='".$_GET['end']."' ";}else{echo " value=\"".date("Y-m-d",strtotime("+1 day"))."\" ";}?> />
                        </div>
                    </div>
                </div>
                <div class="col-sm-2">
                    <div class="input-group">
                        <input type="text" class="input-sm form-control" <?php if(isset($_GET['realname'])&&$_GET['realname']){echo " value='".$_GET['realname']."' ";}else{echo " placeholder=\"姓名\" ";}?> name="realname" id="testNoBtn">
                    </div>
                </div>
                <div class="col-sm-3 pull-right">
                    <div class="input-group">
                        <button type="submit" class="btn btn-sm btn-primary"> 查询</button>
                    </div>
                </div>
            </form>
        </div>

        <table id="table_list_2"></table>

        <div style="border-bottom: 1px solid #ddd;border-top: 0px solid #ddd;border-left: 1px solid #ddd;border-right: 1px solid #ddd;padding-top:10px"> <?php echo $pages;?></div>
    </div>
</div>
		<div class="modal inmodal" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content animated bounceInRight">
					<div class="modal-header" style="position: relative;">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
                        </button>
                        <form method="post" action="/admin/cash/doadd" enctype="multipart/form-data" id="caozuoform">
                            <div id="select_kuang">
                                <input type="hidden" name="id" id="id" value="1"/>
                                <input type="file" class="file" name="pz_img" id="pz_img"/>
                                <div action="" method="post">
                                    <div class="pull-left">
                                    <label id="tongguo_label"><input type="radio" name="xuanze" value="1" checked="true"/>提现申请通过</label>
                                    <label id="jujue_label"><input type="radio" name="xuanze" value="2"/>提现申请拒绝</label>
                                    </div>
                                </div>
                                <div id="tongguo" style="position: relative;">
                                <div class="ibox-content pull-left" style="border: none;width: 100%;border-bottom: 1px solid #ccc;">
                                    <div id="my-awesome-dropzone" class="dropzone" action="#">
                                        <div class="dropzone-previews text-left"></div>
                                        <input type="button" class="btn btn-primary pull-right " id="baocun" name="baocun" value="保存">
                                    </div>
                                </div>
                                <div class="pull-left" style="width: 100%;height:100px;">
                                    <img src="" alt="" id="imgShow" />
                                    <table border="0" cellspacing="0" cellpadding="0" class="pull-right" style="margin-top: 15px;" >
                                        <tr><td>操作人</td><td>时间</td></tr>
                                        <tr><td>宋丹</td><td>2016/07/20 12:23:23</td></tr>
                                    </table>
                                </div>
                                </div>
                                <div id="jujue" style="position: relative;">
                                <div class="ibox-content pull-left" style="border: none;width: 100%;border-bottom: 1px solid #ccc;">
                                    <div action="#">
                                        <div>
                                            <div class="pull-left">拒绝理由:</div>
                                            <p class="pull-right"style="width: 89%;"><textarea name="memo" rows="" cols="" style="width: 100%;height: 100px;resize:none;"></textarea></p>
                                        </div>
                                        <div style="clear: both;"><button type="button" id="baocun" class="btn btn-primary pull-right ">保存</button></div>
                                    </div>
                                </div>
                                <div class="pull-left" style="width: 100%;height:100px;">
                                    <table border="0" cellspacing="0" cellpadding="0" style="margin-top: 15px;width:100%" >
                                        <tr><td>内容</td><td>操作人</td><td>时间</td></tr>
                                        <tr><td>因提现金额达到上限</td><td>宋丹</td><td>2016/07/20 12:23:23</td></tr>
                                    </table>
                                </div>
                                </div>
                            </div>
                        </form>
						
					</div>
				</div>
			</div>
		</div>
<script src="/admin/public/js/jquery.min.js?v=2.1.4"></script>
<script src="/admin/public/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/admin/public/js/plugins/peity/jquery.peity.min.js"></script>
<script src="/admin/public/js/plugins/jqgrid/i18n/grid.locale-cnffe4.js?0820"></script>
<script src="/admin/public/js/plugins/jqgrid/jquery.jqGrid.minffe4.js?0820"></script>
<script src="/admin/public/js/plugins/iCheck/icheck.min.js"></script>
<script src="/admin/public/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script src="/admin/public/js/duzisheli.js"></script>
<script>
    $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
</script>
<script type="text/javascript">
    $(function(){
        $('#jujue').removeClass('xianshi');
        $('#jujue').addClass('yincang');
        $('#tongguo_label').click(function(){
            $('#jujue_label input').attr('checked')==false;
            $('#tongguo_label input').attr('checked')==true;
            $('#tongguo').removeClass('yincang');
            $('#tongguo').addClass('xianshi');
            $('#jujue').removeClass('xianshi');
            $('#jujue').addClass('yincang');
        });
        $('#jujue_label').click(function(){
            $('#jujue_label input').attr('checked')==true;
            $('#tongguo_label input').attr('checked')==false;
            $('#tongguo').removeClass('xianshi');
            $('#jujue').removeClass('yincang');
            $('#tongguo').addClass('yincang');
            $('#jujue').addClass('xianshi');
        });
        
    })
</script>
<script>
    $(document).ready(function() {
        $.jgrid.defaults.styleUI = "Bootstrap";
        var mydata = [
            <?php
//print_r($data);
            foreach($data as $k=>$v)
            {
            $v['admin_status']=(isset($v['admin_status'])&&$v['admin_status']==-1)?"未处理":"已处理";
                echo "{id: \"$v[asset_id]\",
            vip_dengji: \"$v[level]\",
            zhanghao: \"$v[realname]\",
            shenqingtixian: '$v[profit]',
            dakuanzhaungtai: '$v[admin_status]',
            invdate: \"".date("Y-m-d",$v['datatime'])."\",
            tax: \"<span class='glyphicon glyphicon-remove'></span>\",
            caozuo: '<a href=\"#myModal\" data-toggle=\"modal\" data-id=\"$v[asset_id]\" class=\"caozuo\">操作</a>',
            note: \"已打款\",},";
            }

            ?>
       ];
        $("#table_list_2").jqGrid({
            data: mydata,
            datatype: "local",
            height: 450,
            autowidth: true,
            shrinkToFit: true,
            rowNum: 20,
            rowList: [10, 20, 30],
            colNames: ["序号", "会员等级", "账号", '申请提现金额', '打款状态', "日期", "状态", '操作', "备注"],
            colModel: [{
                name: "id",
                index: "id",
                editable: true,
                width: 60,
                sorttype: "int",
                search: true
            }, {
                name: "vip_dengji", //会员等级
                index: "vip_dengji",
                editable: true,
                width: 130
            }, {
                name: "zhanghao", //账号
                index: "zhanghao",
                editable: true,
                width: 130
            }, {
                name: "shenqingtixian", //申请提现金额
                index: "shenqingtixian",
                editable: true,
                width: 130,
                formatter: "number"
            }, {
                name: "dakuanzhaungtai", //打款状态
                index: "dakuanzhaungtai",
                editable: true,
                width: 80
            }, {
                name: "invdate", //日期对象
                index: "invdate",
                editable: true,
                width: 80,
                sorttype: "date",
                formatter: "date"
            }, {
                name: "tax", //状态
                index: "tax",
                editable: true,
                width: 80,
                align: "center",
                sorttype: "float"
            }, {
                name: "caozuo", //操作
                index: "caozuo",
                editable: true,
                width: 80,
                align: "center",
                sorttype: "float"
            }, {
                name: "note", //备注
                index: "note",
                align: "center",
                editable: true,
                width: 80,
                sortable: false
            }],
            pager: "#pager_list_2",
            viewrecords: true,
            add: true,
            edit: true,
            addtext: "Add",
            edittext: "Edit",
            hidegrid: false
        });
        $("#table_list_2").setSelection(4, true);
        $("#table_list_2").jqGrid("navGrid", "#pager_list_2", {
            edit: true,
            add: true,
            del: true,
            search: true
        }, {
            height: 200,
            reloadAfterSubmit: true
        });
        $(window).bind("resize", function() {
            var width = $(".jqGrid_wrapper").width();
            $("#table_list_1").setGridWidth(width);
            $("#table_list_2").setGridWidth(width)
        })
    });
</script>
<script type="text/javascript" src="/public/js/huiyuanxinxi/uploadPreview.js"></script>
<script>
    $(document).ready(function() {
        new uploadPreview({ UpBtn: "pz_img", DivShow: "imgdiv", ImgShow: "imgShow" });
    });
</script>
<script>
    $(function(){
        //点击操作
        $(document).on('click', '#baocun', function(){
            alert("操作成功！");
            $("#caozuoform").submit();

        });
        $(document).on('click', '.caozuo', function(){
            var bianhao = $(this).data('id');
            $("#id").attr('value',bianhao);



//            $.ajax({
//                type: "POST",
//                url: "/admin/cash/doadd",
//                data : {bianhao:bianhao},
//                success: function(data) {
//                    var data = jQuery.parseJSON(data);
//                   // document.getElementById('user_number').innerHTML = data.user_number;
//                    //document.getElementById('realname').innerHTML = data.realname;
//                    //document.getElementById('identity_card').innerHTML = data.identity_card;
//                    //document.getElementById('bankcard').innerHTML = data.bankcard;
//                },
//            });
//            return false;
        })
        //点击通过
//        $('#tongguo').on('click', function(){
//            var user_number = document.getElementById("user_number").innerHTML;
//            $.ajax({
//                type: "POST",
//                url: "/admin/member/ajaxTongguo",
//                data : {user_number:user_number},
//                success: function(data) {
//                    //window.location = "/admin/member/index";
//                },
//            });
//            return false;
//            $('#myModal').modal('toggle');
//        })
        //点击拒绝后确认拒绝(已经输入理由)
//        $('#quedingjujue').on('click', function(){
//            var user_number = document.getElementById("user_number").innerHTML;
//            var opinion = $("#opinion").val();
//            $.ajax({
//                type: "POST",
//                url: "/admin/member/ajaxWeitongguo",
//                data : {
//                    user_number:user_number,
//                    opinion:opinion,
//                },
//                success: function(data) {
//                    //alert(data);return;
//                    window.location = "/admin/member/index";
//                },
//            });
//            return false;
//            $('#myModal2').modal('toggle');
//            $('#myModal').modal('toggle');
//        })
    })
</script>

</script>

<script src="/admin/public/js/plugins/cropper/cropper.min.js"></script>

<script>
    $("#data_5 .input-daterange").datepicker({
        keyboardNavigation: !1,
        forceParse: !1,
        autoclose: !0
    });
</script>
</body>
</html>